package com.jnmd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jnmd.mapper.CourseMapper;
import com.jnmd.pojo.Course;
import com.jnmd.service.CourseService;

@Service
public class CourseServiceImpl implements CourseService {
	
	@Autowired
	private CourseMapper courseMapper;
	
	@Override
	public List<Course> getAllCourse() {
		return courseMapper.getAllCourse();
	}

	@Override
	public Course findCourseById(int id) {
		
		return courseMapper.findCourseById(id);
	}

	@Override
	public int addCourse(Course course) {
		
		return courseMapper.addCourse(course);
	}

	@Override
	public void updateCourse(Course course) {
		
		courseMapper.updateCourse(course);
	}

	@Override
	public void deleteCourse(int id) {
		
		courseMapper.deleteCourse(id);
	}

}
